<?php


namespace StarCloud\Library\Sdk;

use Framework\DiServices\HttpClient;
use Phalcon\Di;
use StarCloud\Library\HttpCurl;
use StarCloud\Models\Doumvip\AppCookie;

class ZhijianBot
{
    use HttpCurl;
    /* @var $httpClient HttpClient */
    private $httpClient = null;

    public function __construct()
    {
        $this->httpClient = Di::getDefault()->get('httpClient');
        $this->cacheClass = Di::getDefault()->get('redis');
    }

    public function getPostList($params)
    {
        $response =  $this->httpClient->sendPostRequest("https://enterpriseadmin.onlineweixin.com/trusteeship-api/trusteeshipEnterpriseMixedShearGroup/getCanUseVideoList?" , $params, $this->getHeader());
        $json = json_decode($response->getBody()->getContents(), true);

        return $json;
    }

    public function createVideo()
    {
        $url = "https://enterpriseadmin.onlineweixin.com/trusteeship-api/trusteeshipEnterpriseMixedShearGroup/appendNeedMaskVideoNum";

    }

    private function getHeader()
    {
        return [
            'Content-Type' => 'application/json',
            'A-Token' => AppCookie::getAppCookie(175)
        ];
    }
}